package com.qin.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 *
 * 参数配置类（XXXProperties）
 *
 * @author qinxh
 * @date 2020/08/12
 */
@ConfigurationProperties(prefix = "qin.log")
public class LogProperties {

    /**
     * 是否开启starter功能：true - 是 ; false - 否
     */
    private Boolean open;

    /**
     * 被收集日志服务名
     */
    private String collectServiceName;

    /**
     * netty日志收集服务端挂載对应客户端连接个数的zk节点路径
     */
    private String clientNumber;

    /**
     * zk节点数据保存注册的netty服务端当前日志文件大小（byte）关键字
     */
    private String fileSize;

    /**
     * zk地址。集群地址逗号隔开
     */
    private String zkPath;

    /**
     * zk 创建客户端重试次数
     */
    private Integer zkTryTimes;

    /**
     * zk 创建客户端重试间隔（ms）
     */
    private Integer zkBetweenRetries;

    /**
     * zk 会话超时时间（ms）
     */
    private Integer zkSessionTimeout;

    /**
     * zk 连接超时时间(ms)
     */
    private Integer zkConnTimeout;

    /**
     * netty日志收集服务端注册zk的命名空间
     */
    private String zkLogWorkspace;

    /**
     * 指定netty日志收集服务端挂载zk的节点路径
     */
    private String zkNodePath;

    /**
     * 日志文件和客户端连接数权重值（范围为1 ~ 9，默认值5。用于计算netty连接负载策略计算。如果超过此范围，使用默认值5）
     */
    private Integer sizeAndNumWeights;

    public Boolean getOpen() {
        return open;
    }

    public void setOpen(Boolean open) {
        this.open = open;
    }

    public String getCollectServiceName() {
        return collectServiceName;
    }

    public void setCollectServiceName(String collectServiceName) {
        this.collectServiceName = collectServiceName;
    }

    public String getZkPath() {
        return zkPath;
    }

    public void setZkPath(String zkPath) {
        this.zkPath = zkPath;
    }

    public Integer getZkTryTimes() {
        return zkTryTimes;
    }

    public void setZkTryTimes(Integer zkTryTimes) {
        this.zkTryTimes = zkTryTimes;
    }

    public Integer getZkBetweenRetries() {
        return zkBetweenRetries;
    }

    public void setZkBetweenRetries(Integer zkBetweenRetries) {
        this.zkBetweenRetries = zkBetweenRetries;
    }

    public Integer getZkSessionTimeout() {
        return zkSessionTimeout;
    }

    public void setZkSessionTimeout(Integer zkSessionTimeout) {
        this.zkSessionTimeout = zkSessionTimeout;
    }

    public Integer getZkConnTimeout() {
        return zkConnTimeout;
    }

    public void setZkConnTimeout(Integer zkConnTimeout) {
        this.zkConnTimeout = zkConnTimeout;
    }

    public String getZkLogWorkspace() {
        return zkLogWorkspace;
    }

    public void setZkLogWorkspace(String zkLogWorkspace) {
        this.zkLogWorkspace = zkLogWorkspace;
    }

    public String getZkNodePath() {
        return zkNodePath;
    }

    public void setZkNodePath(String zkNodePath) {
        this.zkNodePath = zkNodePath;
    }

    public String getClientNumber() {
        return clientNumber;
    }

    public void setClientNumber(String clientNumber) {
        this.clientNumber = clientNumber;
    }

    public String getFileSize() {
        return fileSize;
    }

    public void setFileSize(String fileSize) {
        this.fileSize = fileSize;
    }

    public Integer getSizeAndNumWeights() {
        return sizeAndNumWeights;
    }

    public void setSizeAndNumWeights(Integer sizeAndNumWeights) {
        this.sizeAndNumWeights = sizeAndNumWeights;
    }
}
